Skip to content

London | 26-SDC-MAR | Jamal Laqdiem | Sprint 2 | Chat App #92

Open
jamallaqdiem wants to merge 17 commits into
CodeYourFuture:mainfrom
jamallaqdiem:feat-complete-chat-app
Open

London | 26-SDC-MAR | Jamal Laqdiem | Sprint 2 | Chat App #92
jamallaqdiem wants to merge 17 commits into
CodeYourFuture:mainfrom
jamallaqdiem:feat-complete-chat-app

Conversation

@jamallaqdiem

@jamallaqdiem jamallaqdiem commented Jun 5, 2026

Copy link
Copy Markdown

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Changelist

Implementing the chat app using react typescript.

The app support additional features like:

  1. added likes button
  2. Added dislike button
  3. Storing the likes and dislikes count
  4. Persistent username

Urls to Coolify:
Client Url
Server Url

@jamallaqdiem

Copy link
Copy Markdown
Author

Client Url
Server Url

@jamallaqdiem jamallaqdiem added Module-Decomposition The name of the module. 📅 Sprint 2 Assigned during Sprint 2 of this module Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Jun 5, 2026
@cjyuan

cjyuan commented Jun 6, 2026

Copy link
Copy Markdown

The spec has this requirement:

It must also support at least one additional feature.

The Changelist section in the PR description would be the best place to include this info.


The PR description is also a better place to include the frontend and backend links because it would make finding all info in one place easier.


Can you also fix the Markdown syntax of the checkboxes in the PR description?

@jamallaqdiem

Copy link
Copy Markdown
Author

@cjyuan Thanks for reviewing, I addressed the issues in the PR, could you have a look please?

@cjyuan cjyuan left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code could use some documentation (comments).

A useful rule of thumb is to ask yourself whether you could still explain or figure out how the code works few months from now. If the answer is uncertain, consider adding a comment to help future readers understand the intent and reasoning behind it.


I will review this PR in several rounds. Can you addressed the current feedback first?

Comment thread chat-app/server/src/server.ts
Comment thread chat-app/server/src/server.ts
Comment thread chat-app/client/src/components/ChatInput.tsx Outdated
Comment thread chat-app/client/src/App.tsx Outdated
Comment thread chat-app/client/src/App.tsx Outdated
Comment thread chat-app/client/src/App.tsx Outdated
@cjyuan cjyuan added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Jun 6, 2026
@jamallaqdiem

Copy link
Copy Markdown
Author

Code could use some documentation (comments).

A useful rule of thumb is to ask yourself whether you could still explain or figure out how the code works few months from now. If the answer is uncertain, consider adding a comment to help future readers understand the intent and reasoning behind it.

I will review this PR in several rounds. Can you addressed the current feedback first?

Thanks for reviewing, I will add the comments and address the feedbacks.

@jamallaqdiem jamallaqdiem added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jun 9, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions Bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jun 9, 2026
@jamallaqdiem jamallaqdiem added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jun 9, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions Bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jun 9, 2026
@jamallaqdiem jamallaqdiem added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jun 9, 2026

@cjyuan cjyuan left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good and the code looks reasonably modular and organized. That said, I'm not very familiar with React, so I can't offer much guidance on React-specific best practices. You might get more useful feedback by asking an AI assistant.

Well done on exploring React and WebSocket technologies in your project. It's great to see you taking the initiative to learn and apply new concepts. Keep up the good work!

Comment on lines +8 to +11
const messages: Message[] = [
{
id: 1,
username: "Alice",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider keeping the mock data in a separate file and using a function to populate the initial storage. This approach would make the code easier to deploy and maintain in production.

const [alert, setAlert] = useState("");
const [messageType, setMessageType] = useState("");
const port = "https://backendchatapp.hosting.codeyourfuture.io/api";
const port2 = "wss://backendchatapp.hosting.codeyourfuture.io/api";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: Look up

In an React app, where should app-specific configurable settings such as backend server domain be stored?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could use a .env file to store these domains in the local developments, then use the env variable setting in the cloud provider.

@cjyuan cjyuan added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Reviewed Volunteer to add when completing a review with trainee action still to take. labels Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Complete Volunteer to add when work is complete and all review comments have been addressed. Module-Decomposition The name of the module. 📅 Sprint 2 Assigned during Sprint 2 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants